package csel.controller.bindings;

import csel.controller.enums.ActionEnum;
import csel.controller.enums.CommandEnum;

public class ActionCommandBindings extends
		AbstractBindings<ActionEnum, CommandEnum>
{
	private static ActionCommandBindings instance;

	/**
	 * The constructor for this class takes no parameters. It adds all the
	 * default bindings we want our game to have. As new actions that need
	 * bindings are created they need to be added to this constructor.
	 */
	private ActionCommandBindings()
	{
		super();
		updateBinding(ActionEnum.MOVE_SOUTHWEST, 		CommandEnum.MOVE_COMMAND);
		updateBinding(ActionEnum.MOVE_SOUTH, 	 		CommandEnum.MOVE_COMMAND);
		updateBinding(ActionEnum.MOVE_SOUTHEAST, 		CommandEnum.MOVE_COMMAND);
		updateBinding(ActionEnum.MOVE_WEST, 			CommandEnum.MOVE_COMMAND);
		updateBinding(ActionEnum.MOVE_EAST, 			CommandEnum.MOVE_COMMAND);
		updateBinding(ActionEnum.MOVE_NORTHWEST, 		CommandEnum.MOVE_COMMAND);
		updateBinding(ActionEnum.MOVE_NORTH, 			CommandEnum.MOVE_COMMAND);
		updateBinding(ActionEnum.MOVE_NORTHEAST, 		CommandEnum.MOVE_COMMAND);
		updateBinding(ActionEnum.ATTACK, 				CommandEnum.ATTACK_COMMAND);
		updateBinding(ActionEnum.RELEASE, 				CommandEnum.STOP_COMMAND);
		updateBinding(ActionEnum.SP_NEW, 				CommandEnum.SP_NEWGAME_COMMAND);
		updateBinding(ActionEnum.SP_LOAD, 				CommandEnum.SP_LOAD_COMMAND);
		updateBinding(ActionEnum.SP_QUIT,				CommandEnum.SP_QUIT_COMMAND);
		updateBinding(ActionEnum.EQUIPMENT, 			CommandEnum.GV_SWITCH_EQUIPMENT);
		updateBinding(ActionEnum.INVENTORY, 			CommandEnum.GV_SWITCH_INVENTORY);
		updateBinding(ActionEnum.SKILLS,	 			CommandEnum.GV_SWITCH_SKILLS);
		updateBinding(ActionEnum.RETURN,	 			CommandEnum.GV_SWITCH_SKILLS);
		updateBinding(ActionEnum.CHANGE_SUBVIEW,		CommandEnum.GV_SWITCH_SUBVIEW);
		updateBinding(ActionEnum.ROTATE_SLOTS, 			CommandEnum.GV_ROTATE_SLOTS);
		updateBinding(ActionEnum.TOGGLE_MENU,			CommandEnum.GV_TOGGLE_MENU_COMMAND);
		updateBinding(ActionEnum.CHANGE_BINDINGS_SHOW, 	CommandEnum.CHANGE_BINDINGS_SHOW);
		updateBinding(ActionEnum.HIDE_DIALOG,			CommandEnum.HIDE_DIALOG);
		updateBinding(ActionEnum.BM_NEW, 				CommandEnum.BM_NEW_GAME_COMMAND);
		updateBinding(ActionEnum.BM_LOAD, 				CommandEnum.BM_LOAD_COMMAND);
		updateBinding(ActionEnum.BM_SAVE, 				CommandEnum.BM_SAVE_COMMAND);
		updateBinding(ActionEnum.BM_QUIT,				CommandEnum.BM_QUIT_COMMAND);
		updateBinding(ActionEnum.BM_CHANGE_CONTROLS,	CommandEnum.BM_CHANGE_CONTROLS_COMMAND);
		updateBinding(ActionEnum.BM_SKILLS_UPGRADE,		CommandEnum.BM_SKILLS_UPGRADE_COMMAND);
		updateBinding(ActionEnum.BM_SKILLS_USESELF,		CommandEnum.BM_SKILLS_USESELF_COMMAND);
		updateBinding(ActionEnum.BM_SKILLS_USEOTHER,	CommandEnum.BM_SKILLS_USEOTHER_COMMAND);
		updateBinding(ActionEnum.SHOW_NPC_DIALOG, 		CommandEnum.SHOW_NPC_DIALOG_COMMAND);
		updateBinding(ActionEnum.SHOW_TRADE_DIALOG, 	CommandEnum.SHOW_TRADE_DIALOG_COMMAND);
		updateBinding(ActionEnum.BUY, 					CommandEnum.BUY_COMMAND);
		updateBinding(ActionEnum.SELL,					CommandEnum.SELL_COMMAND);
		updateBinding(ActionEnum.LEAVE_VEHICLE,			CommandEnum.LEAVE_VEHICLE_COMMAND);	
	}

	public static ActionCommandBindings getInstance()
	{
		if (instance == null)
		{
			instance = new ActionCommandBindings();
		}
		return instance;
	}
}
